<template>
    <div>
        <div v-for="score in player.role.result.scores" :class="maxScore === score.score ? 'gd-win' : ''">
            <i v-if="maxScore === score.score" class="fa fa-fw fa-trophy"></i> {{ score.role }} : {{ score.score }}
        </div>
    </div>
</template>
<script>
    export default {
        computed: {
            maxScore() {
                return this.player.role.result.scores.reduce((s, score) => Math.max(s, score.score), 0);
            }
        },
        props: {
            player: Object
        }
    }
</script>
<style lang="less" scoped>
    .gd-win {
        color: #ffff66;
    }
</style>